package com.gongj.annotation;

import org.springframework.beans.factory.annotation.Autowire;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Lookup;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;


@Service
@Scope("prototype")
public class TestController {

	@Autowired
	private ABCServieImpl abcServie;

//	public TestController(){
//		System.out.println("无");
//	}

	@Autowired
	public TestController(ABServiceImpl str){
		System.out.println(str);
		System.out.println("一个");
	}
	@Autowired
	public void a(ABServiceImpl str){
		System.out.println(str);
		System.out.println("一个 a ");
	}
	public void b(ABServiceImpl str){
		System.out.println(str);
		System.out.println("一个 b ");
	}


//	public TestController( ABServiceImpl str, ABServiceImpl a){
//		System.out.println("两个");
//	}

//	public void print() {
//		getPrototypeBean().eat();
//	}
//	// 也可以写成 @Lookup("prototypeBean") 来指定需要注入的bean
//	@Lookup
//	public ABServiceImpl getPrototypeBean(){
//		return null;
//	}
}
